// Model.h
#pragma once

#include <string>
#include <iostream>
#include "Labyrinthe.h"
#include "PacMan.h"

using namespace std;

class Model {
private:
	static Model *instance; // Instance du Model pour le pattern singleton

	int score;
	Labyrinthe* myLabyrinthe;
	PacMan* myPacMan;
	bool modeSuper;
	Ghost* ghost_tab[10];
	int nombreGhost;

public:
	int getScore(){
		return score;
	}
	void incScore();
	bool isModeSuper() {
		return modeSuper;
	}
	Labyrinthe* getLabyrinthe(){
		return myLabyrinthe;
	}
	PacMan* getPacMan(){
		return myPacMan;
	}
	int getNombreGhost() {
		return nombreGhost;
	}
	Ghost** getGhostTab() {
		return ghost_tab;
	}
	int getCurrentMatrixX();
	int getCurrentMatrixY();
	void modifierPositionPacMan(int, int);
	void modifierPositionGhosts();
	void setModeSuper(bool);
	void switchSides();
	void addGhost(int, int);
	int getRandomInc();
	friend istream& operator>>(istream&, Model&);
	Model();
	// Pattern singleton
	static Model *getInstance();
};
